/**
 * @Author: 焦质晔
 * @Date: 2019/6/20
 * @Last Modified by: max.jianhua
 * @Last Modified time: 2020-11-20 15:21:28
 */
import axios from '@/api/fetch';
import SERVER from '@/api/server';

// 折扣策略维护(OEM)

// 数据查询GET /fiDiscountPolicy/searchFiDiscountRuleDTOList
export const queryList = (params) => axios.get(`${SERVER.WHOLESALES}/fiDiscountPolicy/searchFiDiscountRuleDTOList`, {
  params
})
// 订单细分查询  /fiOrderTypeSub/searchFiOrderTypeSubDTOList
export const queryOrderTypeSub = (params) => axios.get(`${SERVER.WHOLESALES}/fiOrderTypeSub/searchFiOrderTypeSubDTOListNotPage`, {
  params
})


// 新增、修改数据 /fiDiscountPolicy/saveFiDiscountPolicy
export const savePolicyData = (params) => axios.post(`${SERVER.WHOLESALES}/fiDiscountPolicy/saveFiDiscountPolicy`, params)

// 提交数据 /fiDiscountPolicy/commitFiDiscountPolicy
export const submitData = (param) => axios.post(`${SERVER.WHOLESALES}/fiDiscountPolicy/commitFiDiscountPolicy`, param)

// 根据id查询详情 /fiDiscountPolicy/getFiDiscountPolicyDTOById
export const getFiDiscountPolicyById = (Id) => axios.get(`${SERVER.WHOLESALES}/fiDiscountPolicy/getFiDiscountPolicyDTOById?id=${Id}`)
// 折扣规则查询GET fiDiscountRule/searchFiDiscountRuleDTOList
export const queryRuleList = (params) => axios.get(`${SERVER.WHOLESALES}/fiDiscountRule/searchFiDiscountRuleDTOList`, {
  params
})
// 结算方式 /fiAccountType?fundsType=0&powerType=60081001
export const getFiAccountType = (params) => axios.post(`${SERVER.WHOLESALES}/tmFiAccountType/list`, params)
// 车系	根据查询条件返回车系		http://localhost:7891/vehicleProduct/seriess/all
export const querySeriessList = (params) => axios.get(`${SERVER.BASEDATA}/vehicleProduct/seriess/all`, {
  params
})
// 车型	根据查询条件返回车型		http://localhost:7891/vehicleProduct/models/all?seriesId=1
export const queryModelsList = (params) => axios.get(`${SERVER.BASEDATA}/vehicleProduct/models/alls`, {
  params
})
// 配置	根据查询条件返回配置		"http://localhost:7891/vehicleProduct/packages/all?seriesId=1
export const queryPackagesList = (params) => axios.get(`${SERVER.BASEDATA}/vehicleProduct/packages/all`, {
  params
})

// 选装 /api/basedata/vehicleProduct/options/all 带分页
export const queryOptionsList = (params) => axios.get(`${SERVER.BASEDATA}/vehicleProduct/options`, {
  params
})
export const queryOptionsAllList = (params) => axios.get(`${SERVER.BASEDATA}/vehicleProduct/optionsNoPage`, {
  params
})
